Assignemnt #57 and 55th program
Code
///Name: Derrick Andreasen
///Period: 7
///Program name: 55th Program
///File name: Fift5Prog.java
///Date Finished:11/9/2015
import java.util.Random;
public class Fift5Prog
{
public static void main( String[] args )
{
Random r = new Random();
int x = 1 + r.nextInt(6), c = 1 + r.nextInt(6), v;
System.out.println( "HERE COMES THE DICE!" );
System.out.println( "" );
System.out.println( "Roll #1: " + x );
System.out.println( "Roll #2: " + c );
v = x + c;
System.out.println( "" );
System.out.println( "The total is " + v + "!" );
System.out.println( "" );
}
}
Picture of the output